package spotGUI.supportGUI;

import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import java.util.ResourceBundle;

public class AboutPanel extends JPanel{
	private JLabel image;
	private JLabel info;

	/**
	 * Create the panel.
	 */
	public AboutPanel() {
		super();
		setBorder(new EmptyBorder(10, 10, 0, 10));
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{214, 128, 0};
		gridBagLayout.rowHeights = new int[]{176, 0};
		gridBagLayout.columnWeights = new double[]{1.0, 0.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{1.0, Double.MIN_VALUE};
		setLayout(gridBagLayout);
		
		info = new JLabel(ResourceBundle.getBundle("spotGUI.supportGUI.messages").getString("AboutPanel.info.text")); //$NON-NLS-1$ //$NON-NLS-2$
		GridBagConstraints gbc_info = new GridBagConstraints();
		gbc_info.anchor = GridBagConstraints.NORTHWEST;
		gbc_info.insets = new Insets(0, 0, 0, 5);
		gbc_info.gridx = 0;
		gbc_info.gridy = 0;
		add(info, gbc_info);
		
		image = new JLabel("");
		image.setHorizontalTextPosition(SwingConstants.LEFT);
		image.setAlignmentX(Component.CENTER_ALIGNMENT);
		image.setIcon(new ImageIcon(AboutPanel.class.getResource("/images/Icons/128x128px/info.png")));
		GridBagConstraints gbc_image = new GridBagConstraints();
		gbc_image.anchor = GridBagConstraints.NORTHWEST;
		gbc_image.gridx = 1;
		gbc_image.gridy = 0;
		add(image, gbc_image);
	}

}
